Skip to main content
Version: 5.x.x

DispatcherOptionsType


import { DispatcherOptionsType } from "@hyper-fetch/core"

Description

Defined in dispatcher/dispatcher.types.ts:4

Preview

type DispatcherOptionsType = {
onClearStorage: (dispatcherInstance: Dispatcher) => void;
onDeleteFromStorage: <Request>(queueKey: string, data: QueueDataType<Request>) => void;
onInitialization: (dispatcherInstance: Dispatcher) => void;
onUpdateStorage: <Request>(queueKey: string, data: QueueDataType<Request>) => void;
storage: DispatcherStorageType;
}

Structure

{
onClearStorage: (dispatcherInstance: Dispatcher) => void;
onDeleteFromStorage: (queueKey: string, data: QueueDataType<Request>) => void;
onInitialization: (dispatcherInstance: Dispatcher) => void;
onUpdateStorage: (queueKey: string, data: QueueDataType<Request>) => void;
storage: {
clear: () => void;
delete: (key: string) => void;
get: (key: string) => QueueDataType<Request> | undefined;
keys: () => string[] | IterableIterator<string>;
set: (key: string, data: QueueDataType<Request>) => void;
};
}